unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Grids, DBGrids, DB, IBCustomDataSet, IBDatabase,
  IBQuery, Provider, DBClient, ExtCtrls, DBCtrls;

type
  TForm1 = class(TForm)
    ds1: TClientDataSet;
    DataSetProvider1: TDataSetProvider;
    IBQuery1: TIBQuery;
    ds2: TDataSource;
    IBDatabase1: TIBDatabase;
    IBTransaction1: TIBTransaction;
    IBQuery1PARAM_FAMILIA: TIBStringField;
    IBQuery1PARAM_MOEDA: TSmallintField;
    IBQuery1PARAM_OBSPED: TIBStringField;
    IBQuery1PARAM_CONDICOESFOR: TIBStringField;
    IBQuery1PARAM_PERTOLERANCIARI: TFloatField;
    IBQuery1PARAM_NRDIASTOLERANCIA: TSmallintField;
    IBQuery1PARAM_CONDPGTOPREFIXADA: TSmallintField;
    IBQuery1PARAM_EMAILPADRAO: TIBStringField;
    IBQuery1PARAM_PERLIMITEABC: TFloatField;
    IBQuery1PARAM_VALORLIMITEQUADROPED: TFloatField;
    IBQuery1PARAM_ULTBACK: TDateTimeField;
    IBQuery1PARAM_VERBANCO: TFloatField;
    IBQuery1PARAM_APRMED: TSmallintField;
    IBQuery1PARAM_CDGCCOMP: TIBStringField;
    IBQuery1PARAM_LOGINCCOMP: TIBStringField;
    IBQuery1PARAM_CONDPGTOCCOMP: TSmallintField;
    IBQuery1PARAM_CDGDENTRO: TIBStringField;
    IBQuery1PARAM_CDGFORA: TIBStringField;
    IBQuery1PARAM_EMPRDESTOQUE: TIntegerField;
    IBQuery1PARAM_CONDPGTOESTOQUE: TSmallintField;
    IBQuery1PARAM_FORNECEDORESTOQUE: TIBStringField;
    IBQuery1PARAM_CATEGORIACCOMP: TIBStringField;
    IBQuery1PARAM_FAMILIACCOMP: TIBStringField;
    IBQuery1PARAM_ESPECIECCOMP: TIBStringField;
    IBQuery1PARAM_ETAPAREQUERIDA: TSmallintField;
    IBQuery1PARAM_OFMESES: TSmallintField;
    IBQuery1PARAM_MASKCCD: TIBStringField;
    IBQuery1PARAM_TPMOV: TSmallintField;
    IBQuery1PARAM_FINANSP7: TSmallintField;
    IBQuery1PARAM_MASKCCTB: TIBStringField;
    IBQuery1PARAM_FDCONTABILIZAR: TSmallintField;
    IBQuery1PARAM_GERAAPAPROVADA: TSmallintField;
    IBQuery1PARAM_TPMOVDEVDEBITO: TSmallintField;
    IBQuery1PARAM_SFORNCCTB: TIBStringField;
    IBQuery1PARAM_SFORNRETCCTB: TIBStringField;
    IBQuery1PARAM_SFORNANTCCTB: TIBStringField;
    IBQuery1PARAM_SFORNCAUCCTB: TIBStringField;
    IBQuery1PARAM_SFORNADTCCTB: TIBStringField;
    IBQuery1PARAM_SCONTACCTB: TIBStringField;
    IBQuery1PARAM_DESDOBRARCCTB: TIBStringField;
    IBQuery1PARAM_DOCUNICOFORN: TSmallintField;
    IBQuery1PARAM_ASSINATURASAP: TSmallintField;
    IBQuery1PARAM_QTDASSINATURASRI: TSmallintField;
    IBQuery1PARAM_ASSINATURASRI: TSmallintField;
    IBQuery1PARAM_VALORLIMITEFINAN: TFloatField;
    IBQuery1PARAM_TIPOEXPORTCCTB: TSmallintField;
    IBQuery1PARAM_EMPRETRANSF: TSmallintField;
    IBQuery1PARAM_ASSINATURASQUADRO: TSmallintField;
    IBQuery1PARAM_PERMITEENTRARSISTEMA: TSmallintField;
    IBQuery1PARAM_CTBDTDOCREC: TIBStringField;
    IBQuery1PARAM_PERJUROSCRB: TIBBCDField;
    IBQuery1PARAM_PERMULTACRB: TIBBCDField;
    IBQuery1PARAM_TIPOJUROSCRB: TSmallintField;
    IBQuery1PARAM_TPMOVCREDITO: TSmallintField;
    IBQuery1PARAM_VENCDIASEXCEDER: TSmallintField;
    IBQuery1PARAM_TPANTECIPACAOCRB: TSmallintField;
    IBQuery1PARAM_RELFLUXOVR: TSmallintField;
    IBQuery1PARAM_RFTOLERANCIAINADIP1: TSmallintField;
    IBQuery1PARAM_RFTOLERANCIAINADIP2: TSmallintField;
    IBQuery1PARAM_RFTOLERANCIAINADIP3: TSmallintField;
    IBQuery1PARAM_RFULTATUAINADIMPLENTE: TDateField;
    IBQuery1PARAM_EXPORTACAOCPG: TSmallintField;
    IBQuery1PARAM_SPRESTOQUE: TSmallintField;
    IBQuery1PARAM_TPREDUTOR: TSmallintField;
    IBQuery1PARAM_EMPREDIF: TSmallintField;
    IBQuery1PARAM_TIPOPARCELARECTO: TSmallintField;
    IBQuery1PARAM_OFESTOQUE: TIntegerField;
    IBQuery1PARAM_CALCJUROSFINAN: TSmallintField;
    IBQuery1PARAM_TPMOVDEVCREDITO: TSmallintField;
    IBQuery1PARAM_TPSERIEREMAN: TIntegerField;
    IBQuery1PARAM_DTCPGFECHAMENTOCTB: TDateField;
    IBQuery1PARAM_NAOCOINCIDEMESVENCMENSAIS: TSmallintField;
    IBQuery1PARAM_PERMORCAMENTO: TSmallintField;
    IBQuery1PARAM_PERDESCAPPROPOSTA: TFloatField;
    IBQuery1PARAM_PERLIMITEAPROVPROPOSTA: TFloatField;
    IBQuery1PARAM_MOEDAATIVOIMOBILIZADO: TSmallintField;
    IBQuery1PARAM_CONTABCTR: TSmallintField;
    IBQuery1PARAM_SALDODEVEDOR: TSmallintField;
    IBQuery1PARAM_MORAVIRADAMES: TSmallintField;
    IBQuery1PARAM_ATUAPEDFLXSEMADT: TSmallintField;
    IBQuery1PARAM_VENCDIASEXCEDERRI: TSmallintField;
    IBQuery1PARAM_MODOCALCULOPRORATA: TSmallintField;
    IBQuery1PARAM_SCUSTODIFCCTB: TIBStringField;
    IBQuery1PARAM_SCUSTOORCCCTB: TIBStringField;
    IBQuery1PARAM_SCUSTOVNDCCTB: TIBStringField;
    IBQuery1PARAM_SRECEITAVNDCCTB: TIBStringField;
    IBQuery1PARAM_DTCONTABILIZAAR: TSmallintField;
    IBQuery1PARAM_VENCDIASEXCEDERREQ: TSmallintField;
    IBQuery1PARAM_VALORLIMITECTRFAT: TFloatField;
    IBQuery1PARAM_DIASPARAPREDATADO: TIntegerField;
    IBQuery1PARAM_MAXMINUTOSINATIVO: TIntegerField;
    IBQuery1PARAM_PARARNA3ACARTA: TSmallintField;
    IBQuery1PARAM_CONTALUCRO: TIBStringField;
    IBQuery1PARAM_CONTAPREJUIZO: TIBStringField;
    IBQuery1PARAM_CRBCFOPDENTRO: TIBStringField;
    IBQuery1PARAM_CRBCFOPFORA: TIBStringField;
    IBQuery1PARAM_CCTBSINTCADAUTOFORN: TIBStringField;
    IBQuery1PARAM_CONCLUIETAPAAUTO: TSmallintField;
    IBQuery1PARAM_PREVFLXPEDCTR: TSmallintField;
    IBQuery1PARAM_CONTROLATALONARIO: TSmallintField;
    IBQuery1PARAM_LOGINSIMULTANEO: TSmallintField;
    IBQuery1PARAM_SCUSTOORCADO: TIBStringField;
    IBQuery1PARAM_CFOPFRETEDENTRO: TIBStringField;
    IBQuery1PARAM_CFOPFRETEFORA: TIBStringField;
    IBQuery1PARAM_GERAPGTODIAUTIL: TSmallintField;
    IBQuery1PARAM_REPASSEATRASADAS: TSmallintField;
    IBQuery1PARAM_EMAILSERVIDORSMTP: TIBStringField;
    IBQuery1PARAM_EMAILPORTA: TIntegerField;
    IBQuery1PARAM_EMAILAUTENTICAR: TSmallintField;
    IBQuery1PARAM_EMAILUSUARIO: TIBStringField;
    IBQuery1PARAM_EMAILSENHA: TIBStringField;
    IBQuery1PARAM_VENCDIASEXCEDERSPR: TSmallintField;
    IBQuery1PARAM_FORMULASERVDNIT: TIntegerField;
    IBQuery1PARAM_INTEGRACAOSACCRM: TIntegerField;
    IBQuery1PARAM_GERAIMPSEP: TSmallintField;
    IBQuery1PARAM_CONTROLECAUCAO: TSmallintField;
    IBQuery1PARAM_CALCPRCMEDMESES: TIntegerField;
    IBQuery1PARAM_COMBUSTIVELESTIMATIVA: TSmallintField;
    IBQuery1PARAM_ALERTAHORIMETRO: TSmallintField;
    IBQuery1PARAM_ALERTAHODOMETRO: TSmallintField;
    IBQuery1PARAM_IDXHORAEXTRA: TIBBCDField;
    IBQuery1PARAM_IDXHORAMES: TIBBCDField;
    IBQuery1PARAM_NUMFOGO: TIntegerField;
    IBQuery1PARAM_EMPRDOFICINA: TIntegerField;
    IBQuery1PARAM_ALERTACOMBUSTIVEL: TSmallintField;
    IBQuery1PARAM_ANTECIPACAOMESCOMERCIAL: TSmallintField;
    IBQuery1PARAM_GERAFINBT: TIntegerField;
    IBQuery1PARAM_ESPECIEMANUTENCAO: TIBStringField;
    IBQuery1PARAM_VALORARREDTABELA: TFloatField;
    IBQuery1PARAM_OPRFBT: TIntegerField;
    IBQuery1PARAM_DIASEMBT: TIntegerField;
    IBQuery1PARAM_PRORATARFAVULSA: TSmallintField;
    IBQuery1PARAM_DATAOS: TIntegerField;
    IBQuery1PARAM_GERAROS: TIntegerField;
    IBQuery1PARAM_GERAOSPREV: TIntegerField;
    IBQuery1PARAM_ATUDTBASEINSUMO: TSmallintField;
    IBQuery1PARAM_ARREDSERIETAB: TFloatField;
    IBQuery1PARAM_COMISSAOOFOPERACAO: TIntegerField;
    IBQuery1PARAM_COMISSAOOFCCD: TIBStringField;
    IBQuery1PARAM_COMISSAOOFEMPRE: TSmallintField;
    IBQuery1PARAM_ALIENACAOFIDUCIARIA: TIntegerField;
    ds1PARAM_FAMILIA: TStringField;
    ds1PARAM_MOEDA: TSmallintField;
    ds1PARAM_OBSPED: TStringField;
    ds1PARAM_CONDICOESFOR: TStringField;
    ds1PARAM_PERTOLERANCIARI: TFloatField;
    ds1PARAM_NRDIASTOLERANCIA: TSmallintField;
    ds1PARAM_CONDPGTOPREFIXADA: TSmallintField;
    ds1PARAM_EMAILPADRAO: TStringField;
    ds1PARAM_PERLIMITEABC: TFloatField;
    ds1PARAM_VALORLIMITEQUADROPED: TFloatField;
    ds1PARAM_ULTBACK: TDateTimeField;
    ds1PARAM_VERBANCO: TFloatField;
    ds1PARAM_APRMED: TSmallintField;
    ds1PARAM_CDGCCOMP: TStringField;
    ds1PARAM_LOGINCCOMP: TStringField;
    ds1PARAM_CONDPGTOCCOMP: TSmallintField;
    ds1PARAM_CDGDENTRO: TStringField;
    ds1PARAM_CDGFORA: TStringField;
    ds1PARAM_EMPRDESTOQUE: TIntegerField;
    ds1PARAM_CONDPGTOESTOQUE: TSmallintField;
    ds1PARAM_FORNECEDORESTOQUE: TStringField;
    ds1PARAM_CATEGORIACCOMP: TStringField;
    ds1PARAM_FAMILIACCOMP: TStringField;
    ds1PARAM_ESPECIECCOMP: TStringField;
    ds1PARAM_ETAPAREQUERIDA: TSmallintField;
    ds1PARAM_OFMESES: TSmallintField;
    ds1PARAM_MASKCCD: TStringField;
    ds1PARAM_TPMOV: TSmallintField;
    ds1PARAM_FINANSP7: TSmallintField;
    ds1PARAM_MASKCCTB: TStringField;
    ds1PARAM_FDCONTABILIZAR: TSmallintField;
    ds1PARAM_GERAAPAPROVADA: TSmallintField;
    ds1PARAM_TPMOVDEVDEBITO: TSmallintField;
    ds1PARAM_SFORNCCTB: TStringField;
    ds1PARAM_SFORNRETCCTB: TStringField;
    ds1PARAM_SFORNANTCCTB: TStringField;
    ds1PARAM_SFORNCAUCCTB: TStringField;
    ds1PARAM_SFORNADTCCTB: TStringField;
    ds1PARAM_SCONTACCTB: TStringField;
    ds1PARAM_DESDOBRARCCTB: TStringField;
    ds1PARAM_DOCUNICOFORN: TSmallintField;
    ds1PARAM_ASSINATURASAP: TSmallintField;
    ds1PARAM_QTDASSINATURASRI: TSmallintField;
    ds1PARAM_ASSINATURASRI: TSmallintField;
    ds1PARAM_VALORLIMITEFINAN: TFloatField;
    ds1PARAM_TIPOEXPORTCCTB: TSmallintField;
    ds1PARAM_EMPRETRANSF: TSmallintField;
    ds1PARAM_ASSINATURASQUADRO: TSmallintField;
    ds1PARAM_PERMITEENTRARSISTEMA: TSmallintField;
    ds1PARAM_CTBDTDOCREC: TStringField;
    ds1PARAM_PERJUROSCRB: TBCDField;
    ds1PARAM_PERMULTACRB: TBCDField;
    ds1PARAM_TIPOJUROSCRB: TSmallintField;
    ds1PARAM_TPMOVCREDITO: TSmallintField;
    ds1PARAM_VENCDIASEXCEDER: TSmallintField;
    ds1PARAM_TPANTECIPACAOCRB: TSmallintField;
    ds1PARAM_RELFLUXOVR: TSmallintField;
    ds1PARAM_RFTOLERANCIAINADIP1: TSmallintField;
    ds1PARAM_RFTOLERANCIAINADIP2: TSmallintField;
    ds1PARAM_RFTOLERANCIAINADIP3: TSmallintField;
    ds1PARAM_RFULTATUAINADIMPLENTE: TDateField;
    ds1PARAM_EXPORTACAOCPG: TSmallintField;
    ds1PARAM_SPRESTOQUE: TSmallintField;
    ds1PARAM_TPREDUTOR: TSmallintField;
    ds1PARAM_EMPREDIF: TSmallintField;
    ds1PARAM_TIPOPARCELARECTO: TSmallintField;
    ds1PARAM_OFESTOQUE: TIntegerField;
    ds1PARAM_CALCJUROSFINAN: TSmallintField;
    ds1PARAM_TPMOVDEVCREDITO: TSmallintField;
    ds1PARAM_TPSERIEREMAN: TIntegerField;
    ds1PARAM_DTCPGFECHAMENTOCTB: TDateField;
    ds1PARAM_NAOCOINCIDEMESVENCMENSAIS: TSmallintField;
    ds1PARAM_PERMORCAMENTO: TSmallintField;
    ds1PARAM_PERDESCAPPROPOSTA: TFloatField;
    ds1PARAM_PERLIMITEAPROVPROPOSTA: TFloatField;
    ds1PARAM_MOEDAATIVOIMOBILIZADO: TSmallintField;
    ds1PARAM_CONTABCTR: TSmallintField;
    ds1PARAM_SALDODEVEDOR: TSmallintField;
    ds1PARAM_MORAVIRADAMES: TSmallintField;
    ds1PARAM_ATUAPEDFLXSEMADT: TSmallintField;
    ds1PARAM_VENCDIASEXCEDERRI: TSmallintField;
    ds1PARAM_MODOCALCULOPRORATA: TSmallintField;
    ds1PARAM_SCUSTODIFCCTB: TStringField;
    ds1PARAM_SCUSTOORCCCTB: TStringField;
    ds1PARAM_SCUSTOVNDCCTB: TStringField;
    ds1PARAM_SRECEITAVNDCCTB: TStringField;
    ds1PARAM_DTCONTABILIZAAR: TSmallintField;
    ds1PARAM_VENCDIASEXCEDERREQ: TSmallintField;
    ds1PARAM_VALORLIMITECTRFAT: TFloatField;
    ds1PARAM_DIASPARAPREDATADO: TIntegerField;
    ds1PARAM_MAXMINUTOSINATIVO: TIntegerField;
    ds1PARAM_PARARNA3ACARTA: TSmallintField;
    ds1PARAM_CONTALUCRO: TStringField;
    ds1PARAM_CONTAPREJUIZO: TStringField;
    ds1PARAM_CRBCFOPDENTRO: TStringField;
    ds1PARAM_CRBCFOPFORA: TStringField;
    ds1PARAM_CCTBSINTCADAUTOFORN: TStringField;
    ds1PARAM_CONCLUIETAPAAUTO: TSmallintField;
    ds1PARAM_PREVFLXPEDCTR: TSmallintField;
    ds1PARAM_CONTROLATALONARIO: TSmallintField;
    ds1PARAM_LOGINSIMULTANEO: TSmallintField;
    ds1PARAM_SCUSTOORCADO: TStringField;
    ds1PARAM_CFOPFRETEDENTRO: TStringField;
    ds1PARAM_CFOPFRETEFORA: TStringField;
    ds1PARAM_GERAPGTODIAUTIL: TSmallintField;
    ds1PARAM_REPASSEATRASADAS: TSmallintField;
    ds1PARAM_EMAILSERVIDORSMTP: TStringField;
    ds1PARAM_EMAILPORTA: TIntegerField;
    ds1PARAM_EMAILAUTENTICAR: TSmallintField;
    ds1PARAM_EMAILUSUARIO: TStringField;
    ds1PARAM_EMAILSENHA: TStringField;
    ds1PARAM_VENCDIASEXCEDERSPR: TSmallintField;
    ds1PARAM_FORMULASERVDNIT: TIntegerField;
    ds1PARAM_INTEGRACAOSACCRM: TIntegerField;
    ds1PARAM_GERAIMPSEP: TSmallintField;
    ds1PARAM_CONTROLECAUCAO: TSmallintField;
    ds1PARAM_CALCPRCMEDMESES: TIntegerField;
    ds1PARAM_COMBUSTIVELESTIMATIVA: TSmallintField;
    ds1PARAM_ALERTAHORIMETRO: TSmallintField;
    ds1PARAM_ALERTAHODOMETRO: TSmallintField;
    ds1PARAM_IDXHORAEXTRA: TBCDField;
    ds1PARAM_IDXHORAMES: TBCDField;
    ds1PARAM_NUMFOGO: TIntegerField;
    ds1PARAM_EMPRDOFICINA: TIntegerField;
    ds1PARAM_ALERTACOMBUSTIVEL: TSmallintField;
    ds1PARAM_ANTECIPACAOMESCOMERCIAL: TSmallintField;
    ds1PARAM_GERAFINBT: TIntegerField;
    ds1PARAM_ESPECIEMANUTENCAO: TStringField;
    ds1PARAM_VALORARREDTABELA: TFloatField;
    ds1PARAM_OPRFBT: TIntegerField;
    ds1PARAM_DIASEMBT: TIntegerField;
    ds1PARAM_PRORATARFAVULSA: TSmallintField;
    ds1PARAM_DATAOS: TIntegerField;
    ds1PARAM_GERAROS: TIntegerField;
    ds1PARAM_GERAOSPREV: TIntegerField;
    ds1PARAM_ATUDTBASEINSUMO: TSmallintField;
    ds1PARAM_ARREDSERIETAB: TFloatField;
    ds1PARAM_COMISSAOOFOPERACAO: TIntegerField;
    ds1PARAM_COMISSAOOFCCD: TStringField;
    ds1PARAM_COMISSAOOFEMPRE: TSmallintField;
    ds1PARAM_ALIENACAOFIDUCIARIA: TIntegerField;
    dbgrd1: TDBGrid;
    btn1: TButton;
    dbnvgr1: TDBNavigator;
    procedure btn1Click(Sender: TObject);
    procedure ds1AfterPost(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btn1Click(Sender: TObject);
begin
  ds1.Open;
end;

procedure TForm1.ds1AfterPost(DataSet: TDataSet);
begin
  ds1.ApplyUpdates(-1);
end;

end.
